import React from 'react';
import { Route } from 'react-router-dom';
import MyNavLink from './componenets/MyNavLink';

import About from './pages/About';
import Home from './pages/Home';
import Header from './componenets/Header';
export default class App extends React.Component {
  render() {
    return (
      <div>
        <div className="row">
          <div className="col-xs-offset-2 col-xs-8">
            <div className="page-header">
              <Header a={1} />
            </div>
          </div>
        </div>
        <div className="row">
          <div className="col-xs-2 col-xs-offset-2">
            <div className="list-group">
              {/* 原生html靠a标签跳转页面 */}
              {/* <a className= "list-group-item" href="./about.html">
                About
              </a>
              <a className= "list-group-item active" href="./home.html">
                Home
              </a> */}

              {/* 在react总靠路由链接跳转--编写路由链接 */}
              <MyNavLink to="/about" a="1" b="3" c={3}>About</MyNavLink>
              <MyNavLink to="/home">Home</MyNavLink>
            </div>
          </div>
          <div className="col-xs-6">
            <div className="panel">
              <div className="panel-body">
                <Route path="/about" component={About}></Route>
                <Route path="/home" component={Home}></Route>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  }
}
